package com.xuanwei.core.enums;

/**
 * @Author jiangyong
 * @Description TODO
 * @Date 2019/8/1 10:25
 **/
public enum AdPositionType {

    HOMEPAGE_MAIN(1, "首页主要广告位"),
    HOMEPAGE_TIME(2, "首页限时广告位"),
    HOMEPAGE_GROUP(3, "首页团购广告位");


    private Integer code;

    private String message;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    AdPositionType(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static String getMsg(Integer code) {
        AdPositionType[] values = values();
        for (AdPositionType positionType : values) {
            if (positionType.code.equals(code)) {
                return positionType.message;
            }
        }

        return "";
    }
}
